<template>
	<view class="parent-view" v-if="zixunList.length>0">
		<!-- 公告资讯 -->
		<view class="zixun-item" v-for="(zixunItem, zixunIndex) in zixunList" 
		:index="zixunIndex" :key="zixunIndex" @click="goArticleDetails" :data-index="zixunItem">
			<image v-if="zixunItem.icon_image" :src="zixunItem.icon_image" class="zixun-item-image" mode="scaleToFill" />
		</view>
		<view style="height: 25rpx;"></view>
	</view>
</template>

<script>
	import request from '../index/request.js';
	export default {
		data() {
			return {
				zixunList:[
				],
			}
		},
		methods: {
			onShow:function(){
				this.share.title = "公告"
				this.share.url='/pages/information/index?appInviteId='+this.appUtil.getAppInviteId()
				this.share.shareType=0
			},
			onLoad: function(options) {
				this.appUtil.saveAppInviteId(options)
				//资讯
				this.GetZiXunInFo()
			},
			GetZiXunInFo:function(){
				var that=this
				request.post("api/common/H5_page", {
					lave: "9"
				}).then(data => {
					that.zixunList = data.datas
				})
			},
			goArticleDetails:function(e){
				var item=e.currentTarget.dataset.index
				uni.navigateTo({
					url: '/pages/article-details/index?load_url='+encodeURIComponent(item.url)+"&title="+item.name
				})
			},
		}
	}
</script>

<style>
	@import "index.css";
</style>
